home *** CD-ROM | disk | FTP | other *** search
- property spriteNum, pMyAngle, h, v, pWolfDirection, pWolfSpeed, pLocH, pLocV, pWolfDistance, pWolfRotation, pWait4Step, pEatingSheep, pEatingTime
- global gLevel
-
- on beginSprite me
- pLocH = sprite(spriteNum).locH
- pLocV = sprite(spriteNum).locV
- pWolfSpeed = 4
- pWolfDirection = 0.0
- pWolfDistance = 0.0
- pWolfRotation = 0.0
- pWait4Step = 0
- end
-
- on exitFrame me
- if pEatingSheep = 0 then
- pWolfDirection = pWolfDirection - 3.0
- pWolfRotation = 360 - pWolfDirection
- if pWolfDirection <= 0 then
- pWolfDirection = 360
- else
- if pWolfDirection >= 360 then
- pWolfDirection = 0
- end if
- end if
- sprite(spriteNum).rotation = pWolfRotation
- WolfMove()
- else
- if sprite(37).member.name = "deadSheepAnimated2" then
- sprite(37).width = sprite(37).width + 2
- sprite(37).height = sprite(37).height + 2
- if sprite(37).blend >= 2 then
- sprite(37).blend = sprite(37).blend - 2
- end if
- end if
- if sprite(38).member.name = "deadSheepAnimated2" then
- sprite(38).width = sprite(38).width + 2
- sprite(38).height = sprite(38).height + 2
- if sprite(38).blend >= 2 then
- sprite(38).blend = sprite(38).blend - 2
- end if
- end if
- if sprite(39).member.name = "deadSheepAnimated2" then
- sprite(39).width = sprite(39).width + 2
- sprite(39).height = sprite(39).height + 2
- if sprite(39).blend >= 2 then
- sprite(39).blend = sprite(39).blend - 2
- end if
- end if
- if sprite(40).member.name = "deadSheepAnimated2" then
- sprite(40).width = sprite(40).width + 2
- sprite(40).height = sprite(40).height + 2
- if sprite(40).blend >= 2 then
- sprite(40).blend = sprite(40).blend - 2
- end if
- end if
- if pEatingTime < the timer then
- puppetSound(4, "gameoverSound")
- member("endScreenText").text = "Give it another try!"
- go(75)
- end if
- end if
- end
-
- on WolfMove
- pMyAngle = pWolfDirection * PI / 180.0
- h = sin(pMyAngle) * pWolfSpeed
- v = cos(pMyAngle) * pWolfSpeed
- pLocH = pLocH + h
- pLocV = pLocV + v
- sprite(33).loc = point(pLocH, pLocV)
- sprite(33).rotation = pWolfRotation
- CatchSheep()
- sprite(spriteNum).loc = point(pLocH, pLocV)
- end
-
- on CatchSheep
- if sprite(33).intersects(32) then
- if sprite(33).intersects(37) then
- sprite(37).member = "deadSheepAnimated2"
- sprite(37).pSheepAlive = 0
- sprite(37).rotation = 0
- pEatingTime = the timer + 180
- pEatingSheep = 1
- end if
- if sprite(33).intersects(38) then
- sprite(38).member = "deadSheepAnimated2"
- sprite(38).pSheepAlive = 0
- sprite(38).rotation = 0
- pEatingTime = the timer + 180
- pEatingSheep = 1
- end if
- if sprite(33).intersects(39) then
- sprite(39).member = "deadSheepAnimated2"
- sprite(39).pSheepAlive = 0
- sprite(39).rotation = 0
- pEatingTime = the timer + 180
- pEatingSheep = 1
- end if
- if sprite(33).intersects(40) then
- sprite(40).member = "deadSheepAnimated2"
- sprite(40).pSheepAlive = 0
- sprite(40).rotation = 0
- pEatingTime = the timer + 180
- pEatingSheep = 1
- end if
- end if
- end
-
- on WolfSounds
- end
-